package itsm.isperp.framework.security.authentication;

import itsm.isperp.framework.core.context.ContextHolder;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;

/**
 * 系统上下文级别的登出处理
 */
public class ContextLogoutHandler extends SecurityContextLogoutHandler {

	@Override
	public void logout(HttpServletRequest request,
			HttpServletResponse response, Authentication authentication) {
		super.logout(request, response, authentication);
		ContextHolder.clearContext();
	}
}
